//
//  CarDetailViewController.m
//  Audit
//
//  Created by cc on 15-2-13.
//  Copyright (c) 2015年 cc. All rights reserved.
//

#import "CarDetailViewController.h"

@interface CarDetailViewController ()
{
    IBOutlet UILabel *btnSeries;//生产车型
    IBOutlet UILabel *btnModel;//生产配置
    IBOutlet UILabel *txtVin;//VIN
    IBOutlet UILabel *txtTransmission;//变速箱
    IBOutlet UILabel *txtColor;//颜色
    IBOutlet UILabel *txtDriveDirection;//驾驶方向
    IBOutlet UILabel *txtDefect_Info;//重点缺陷
    IBOutlet UILabel *txtRepair_Info;//返修信息
    
    IBOutlet UILabel *txtEngine          ;//引擎
    IBOutlet UILabel *btnPlant   ;//检查地点
    IBOutlet UILabel *btnDomain ;//生产基地
    IBOutlet UILabel *btnAuditGroup     ;//检查组
    IBOutlet UILabel *txtShiftDate      ;//检查日期
    IBOutlet UILabel *txtBuildDate    ;//生产日期
    IBOutlet UILabel *txtCsn     ;//生产序号
    IBOutlet UILabel *btnPhase    ;//生产阶段
}
@end

@implementation CarDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    [self setNavTitle:@"车辆详情"];
    [self setNavBackButton:nil];
    [self setNavRightButton:@"关闭"];
    
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    
    btnSeries.text=self.selectedCar.seriesDesc;
    btnModel.text=self.selectedCar.modelDesc;
    txtVin.text=self.selectedCar.vin;
    txtTransmission.text=self.selectedCar.transmission;
    txtColor.text=self.selectedCar.color;
    txtDriveDirection.text=self.selectedCar.drivedirection;
    txtDefect_Info.text=self.selectedCar.defect_info;
    txtRepair_Info.text=self.selectedCar.repair_info;
    
    txtEngine.text=self.selectedCar.engine;
    btnPlant.text=self.selectedCar.plantDesc;
    btnDomain.text=self.selectedCar.domainDesc;
    btnAuditGroup.text=self.selectedCar.auditGroupDesc;
    txtShiftDate.text=self.selectedCar.shiftDate;
    txtBuildDate.text=self.selectedCar.buildDate;
    txtCsn.text=self.selectedCar.csn;
    btnPhase.text=self.selectedCar.phaseDesc;
}

- (void)navRightButtonActionAtTag:(NSUInteger)tag
{
    //todo:返回数据
    [super backAction:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
